<template>
    <div class="category-model">
      <div class="category-list">
        <div class="title-container">
          <div class="title lf">
            分组管理
          </div>
          <div class="btn rf">
            <el-button type="primary">+添加分组</el-button>
          </div>
        </div>
        <div class="table-box">
          <div class="table-box">
            <el-table :data="cateList" >
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="分组名称">
              </el-table-column>
              <el-table-column label="ID"></el-table-column>
              <el-table-column label="排序权重">
              </el-table-column>
              <el-table-column label="商品数量">
              </el-table-column>
              <el-table-column label="操作" width="140px">
                  <template slot-scope="scope">
                    <div class="control">
                      <a>添加子分组</a>
                      <a>删除</a>
                      <a>编辑</a>
                    </div>
                  </template>
              </el-table-column>
            </el-table>
          </div>
        </div>

      </div>
    </div>
</template>
<script>
export default {
  name: "group",
  components: {},
  methods: {
    //点击切换类型
    handleClickChangeType(data) {
      this.$router.push({
        name:data.type
      })
    },
    //获取分类列表
    getCategoryList() {
      // /wgl_admin/index.php?app=goods_cate&act=get_cate_list
      this.$http(
        "/wgl_admin/index.php?app=goods_cate&act=get_cate_list",
        "get",
        {},
        { cate_id: "" },
        {},
        success => {
          console.log(success);
        },
        error => {
          console.log(error);
        }
      );
    }
  },
  created() {
    // this.getCategoryList();
  },
  mounted() {},

  data() {
    return {
      cateList: [],
      listData: [
        {
          name: "分类",
          type: "group",
          isActive: true
        },
        {
          name: "分组",
          type: "group",
          isActive: false
        }
      ]
    };
  }
};
</script>
<style lang="scss" scoped>
.category-model {
  width: 100%;
  height: 100%;
  padding-left: 118px;
  position: relative;
  .category-list {
    height: 100%;
    margin: 0 50px;
    .title-container {
      width: 1466px;
      height: 110px;
      .title {
        font-size: 22px;
        color: #333;
        height: 100%;
        line-height: 110px;
      }
      .btn {
        margin-top: 44px;
      }
    }
  }
}
</style>
